package com.zzedu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zzedu.common.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 作业内容对象 zz_exercise_book_submit_content
 * 
 * @author Mr.Wang
 * @date 2025-06-02
 */
@TableName("zz_exercise_book_submit_content")
public class ZzExerciseBookSubmitContent implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 作业本ID */
    @Excel(name = "作业本ID")
    private Long bookId;

    /** 原题内容 */
    @Excel(name = "原题内容")
    private String subjectContent;

    /** 题目内容 */
    @Excel(name = "题目内容")
    @NotBlank(message = "题目内容不能为空")
    private String content;

    /** 提交内容 */
    @Excel(name = "提交内容")
    private String submitContent;

    /** 批改备注 */
    @Excel(name = "批改备注")
    private String correctRemark;

    /** 添加时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @NotNull(message = "添加时间不能为空")
    private LocalDateTime gmtCreate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.UPDATE)
    @NotNull(message = "更新时间不能为空")
    private LocalDateTime gmtModify;

    /** 逻辑删除(0：未删除 1：id) */
    @Excel(name = "逻辑删除(0：未删除 1：id)")
    @TableLogic(delval = "id")
    @TableField(fill = FieldFill.INSERT)
    @NotNull(message = "逻辑删除(0：未删除 1：id)不能为空")
    private Integer deleted;

    /** 创建人 */
    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    /** 修改人 */
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getBookId() {
        return bookId;
    }

    public void setBookId(Long bookId) {
        this.bookId = bookId;
    }

    public String getSubjectContent() {
        return subjectContent;
    }

    public void setSubjectContent(String subjectContent) {
        this.subjectContent = subjectContent;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSubmitContent() {
        return submitContent;
    }

    public void setSubmitContent(String submitContent) {
        this.submitContent = submitContent;
    }

    public String getCorrectRemark() {
        return correctRemark;
    }

    public void setCorrectRemark(String correctRemark) {
        this.correctRemark = correctRemark;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(LocalDateTime gmtModify) {
        this.gmtModify = gmtModify;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public String toString() {
        return  ToStringBuilder.reflectionToString(this,ToStringStyle.JSON_STYLE);
    }
}
